class OrdenCompra < ActiveRecord::Base
  belongs_to :proveedor
  belongs_to :usuario
  belongs_to :destino, :foreign_key => 'EntregarA'
  has_many :detalles_orden_compra, :class_name => "DetOrdenCompra", :foreign_key => 'folio_compra'
  accepts_nested_attributes_for :detalles_orden_compra
  attr_accessible :EntregarA, :FechaRegistro, :proveedor_id ,:det_orden_compra_attributes
end
